#ifndef DAEMON_GETNETINFO_H
#define DAEMON_GETNETINFO_H
#include "pox_net.h"
#include "Daemon_FacInfoCtl.h"

//#define PATH_RESOLV_CONF	 "/app/ipcam/resolv.conf"
#define NET_ETH "wlan0"
#define NET_WLAN "wlan0"
#define NET_WORK "/mnt/mtd/Config/network" 
typedef struct tagDMSYSNETINFO{
	UCHAR	NetIpAddr[16];		//IP 地址
	UCHAR	NetGwAddr[16];		//gateway
	UCHAR	NetSubMask[16];		//net mask
	UCHAR	NetMacAddr[24];		//MAC addr
	UCHAR   NetDnsSvI [16];     //DNS1
	UCHAR   NetDnsSvII[16];	    //DNS2
	INT 	ServicePort;
}DM_SYSNETINFO, *LPDM_SYSNETINFO;

typedef struct{
	CHAR 	name[20];
	UINT	des;
	UINT 	gateway;
	UINT 	flag;
	UINT 	val[7];
}ip_str_metric;

enum
{
    TYPE_IP      = 0,
    TYPE_NETMASK = 1,
    TYPE_GATEWAY = 2,
};


INT Daemon_GetNetInfo(LPDM_SYSNETINFO pNetInfo);
INT Daemon_GetMacAddr(CHAR *mac_addr);
INT Daemon_ChangeMacAddr(SAVENANDINFO_T *pFacInfo, const char *ifname ,int dhcp);
INT GetEthAttrFromFile(const int type, char *str, const int str_length);
INT SaveEthAttr2File(int type, char *str);

#endif //DAEMON_GETNETINFO_H
